package com.ExceptionPWTest;

import java.io.FileOutputStream;
import java.io.IOException;

public class FinallyTest {
    public static void main(String[] args) {
        //放在小括号里的流会自动close
        System.out.println("程序开始");
        FileOutputStream fos = null;
        try {
             fos = new FileOutputStream("./a/ss.txt");
            fos.write(65);
            System.out.println("1");
        }catch (Exception e ){
            System.out.println("异常");

        }
        System.out.println("程序结束");
    }
}
